<div class="catagories view">
<h2><?php  echo __('Catagory'); ?></h2>
<table>
    <tr>
        <th>
            <?php echo __('Catogary Id'); ?>
        </th>
        <td>
            <?php echo h($catagory['Catagory']['cat_id']); ?>
        </td>
    </tr>
    <tr>
        <th>
            <?php echo __('Catogary Name'); ?>
        </th>
        <td>
            <?php echo h($catagory['Catagory']['cat_name']); ?>
        </td>
    </tr>
    <tr>
        <th>
            <?php echo __('Description'); ?>
        </th>
        <td>
            <?php echo h($catagory['Catagory']['cat_desc']); ?>
        </td>
    </tr>
</table>

</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Catagory'), array('action' => 'edit', $catagory['Catagory']['cat_id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Catagory'), array('action' => 'delete', $catagory['Catagory']['cat_id']), null, __('Are you sure you want to delete # %s?', $catagory['Catagory']['cat_id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Catagories'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Catagory'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Resources'), array('controller' => 'resources', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Resource'), array('controller' => 'resources', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Resources'); ?></h3>
	<?php if (!empty($catagory['Resource'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Res Id'); ?></th>
		<th><?php echo __('Res Name'); ?></th>
		<th><?php echo __('Res Desc'); ?></th>
		<th><?php echo __('Cat Id'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($catagory['Resource'] as $resource): ?>
		<tr>
			<td><?php echo $resource['res_id']; ?></td>
			<td><?php echo $resource['res_name']; ?></td>
			<td><?php echo $resource['res_desc']; ?></td>
			<td><?php echo $resource['cat_id']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'resources', 'action' => 'view', $resource['res_id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'resources', 'action' => 'edit', $resource['res_id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'resources', 'action' => 'delete', $resource['res_id']), null, __('Are you sure you want to delete # %s?', $resource['res_id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Resource'), array('controller' => 'resources', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
